﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace MyHealthByDesignWebsite.Models
{
    public partial class ActivityLevel
    {
        //Description:  Use to retrieve activity levels from database
        //Created:  Nov 2011
        //Programmer:  Bob Whiteis


        //get activity level for drop down list
        //pre-condition: 
        //post-condition:  Acitivity level have been retrieve from the database and returned as a list
        public IEnumerable<SelectListItem> items()
        {
            var db = new FullDataSetDataContext();
            IEnumerable<SelectListItem> items = db.ActivityLevels
              .Select(c => new SelectListItem
              {
                  Value = c.AL_activityLevelID,
                  Text = c.AL_desc
              });
            return items;
        }
    }
}